﻿@namespace SwashbucklerDiary.Components
@inherits DialogComponentBase

<MDialogExtension MyValue="Value"
                  MyValueChanged="ValueChanged"
                  Eager="true"
                  Fullscreen="true"
                  Transition="">
    <MCard Class="fill-height primary-background d-flex flex-column"
           Ripple="false">
        <MToolbar Class="flex-grow-0"
                  Style="z-index:2;background-color:transparent;"
                  Elevation="0">
            <MButton Icon="true"
                     OnClick="()=>InternalValueChanged(false)">
                <MIcon>
                    mdi-arrow-left
                </MIcon>
            </MButton>

            <MSpacer></MSpacer>

            <MButton Icon="true"
                     OnClick="SaveToLocal">
                <MIcon>
                    mdi-tray-arrow-down
                </MIcon>
            </MButton>
            <MButton Icon="true"
                     OnClick="Share">
                <MIcon>
                    mdi-share-variant-outline
                </MIcon>
            </MButton>
        </MToolbar>

        <div style="position:relative;z-index:1;height:100%;">
            <MImage Id="@Id"
                    Style="position:absolute;"
                    Src="@Src"
                    Width="@("100%")"
                    Height="@("100%")"
                    Contain="true">
                <PlaceholderContent>
                    <MRow Class="fill-height ma-0"
                          Align="@AlignTypes.Center"
                          Justify="@JustifyTypes.Center">
                        <MProgressCircular Indeterminate="true">
                        </MProgressCircular>
                    </MRow>
                </PlaceholderContent>
            </MImage>
        </div>

        <MToolbar Class="flex-grow-0"
                  Style="background-color:transparent;"
                  Elevation="0">
        </MToolbar>
    </MCard>
</MDialogExtension>
